package com.meida.module.bus.provider.service;

import com.meida.common.mybatis.base.service.IBaseService;
import com.meida.common.mybatis.entity.EntityMap;
import com.meida.common.mybatis.model.ResultBody;
import com.meida.module.bus.client.entity.BusMaterialPackage200;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 200分包 接口
 *
 * @author flyme
 * @date 2020-10-29
 */
public interface BusMaterialPackage200Service extends IBaseService<BusMaterialPackage200> {

    ResultBody copyAndUpdate(Map map);

    //按分组修改所有临时版本（分新增/修正类型）的申请状态
    Boolean updateApplayStatus(Long projectId,String packageNo,String majorCode,Integer planType,Integer applayStatus);

    ResultBody subMerge200OaCheck(Map map);

    ResultBody goMerge200(Long projectId, String packageNo, String majorCode, String userName) throws Exception;;

    List<EntityMap> selectPackage200Details(Map map);

    //查询根节点数据
    List<EntityMap> selectPackage200RootDetails(Map params);

    //单一包商累积量
    EntityMap sumSupplierNum(Long projectId, String majorCode, String packageNo, String SupplierNumField);

    //导入更新数据，更新包商量
    ResultBody importOnUpdateBusMaterialPackage200Data(MultipartFile file, Map params);

    ResultBody importOnAddBusMaterialPackage200Data(MultipartFile file, Map map);

    //分承包合同下达
    ResultBody getSrmPms05Req(Map map) throws Exception;

    //某项目分组所有版本信息
    List<EntityMap> selectVersionList(Map map);

    //某项目分组下临时版本数据
    List<BusMaterialPackage200> selectBusMaterialPackage200List(Long projectId, String majorCode, String packageNo);

}
